#This container contains your model and any helper scripts specific to your model.
# When building the image inside mnist.ipynb the base docker image will be overwritten
FROM tensorflow/tensorflow:1.15.2-py3

ADD mnist.py /opt/mnist.py
RUN chmod +x /opt/mnist.py
RUN mkdir -p /tmp/data/raw
RUN mkdir -p /tmp/data/processed
RUN mkdir -p /tmp/data/FashionMNIST/raw
RUN mkdir -p /tmp/data/FashionMNIST/processed

#http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/train-images-idx3-ubyte.gz

COPY train-images-idx3-ubyte.gz /tmp/data/raw/
#FashionMNIST/raw/
COPY train-labels-idx1-ubyte.gz /tmp/data/raw/
#FashionMNIST/raw/
COPY t10k-labels-idx1-ubyte.gz /tmp/data/raw/
#FashionMNIST/raw/
COPY t10k-images-idx3-ubyte.gz /tmp/data/raw/
#FashionMNIST/raw/

RUN  gzip -d /tmp/data/raw/*
#RUN  gzip -d /tmp/data/FashionMNIST/raw/*
ENTRYPOINT ["/usr/bin/python"]
CMD ["/opt/mnist.py"]
